package com.bobo.vote.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.bobo.vote.domain.Topic;
import com.bobo.vote.service.TopicService;

@Controller
public class TopicController {
	
	@Resource
	private TopicService topicService;

	@RequestMapping("selects")
	public String selects(Model model) {
		List<Topic> topics = topicService.selects();
		model.addAttribute("topics",topics);
		return "topics";
	}
}
